package unclassified.simple;

public class CaluculateMoneyInLeetcodeBank_1716 {

    public int totalMoney(int n) {
        int cur = 1;
        int res = 0;
        for (int i = 0; i < n; i++) {
            if (i != 0 && i % 7  == 0) {
                cur++;
            }
            res += cur + (i % 7);
        }
        return res;
    }

    public static void main(String[] args) {
        CaluculateMoneyInLeetcodeBank_1716 cc = new CaluculateMoneyInLeetcodeBank_1716();
        System.out.println(cc.totalMoney(10));
    }
}
